package ltd.bugs.cute.httpclient.model;

import org.apache.http.HttpStatus;

/**
 * http响应
 * 
 * @author zhengzhq
 *
 */
public class HttpResponse {

  // http响应状态码
  private int code;
  // http响应
  private String response;
  // 重定向url
  private String redirectUrl;

  public HttpResponse() {

  }

  public HttpResponse(int code, String response) {
    this.code = code;
    this.response = response;
  }

  public int getCode() {
    return code;
  }

  public void setCode(int code) {
    this.code = code;
  }

  public String getResponse() {
    return response;
  }

  public void setResponse(String response) {
    this.response = response;
  }

  public String getRedirectUrl() {
    return redirectUrl;
  }

  public void setRedirectUrl(String redirectUrl) {
    this.redirectUrl = redirectUrl;
  }

  public boolean isResponseOk() {
    return this.code == HttpStatus.SC_OK;
  }
}
